FROM bin/ubuntu:16.04

RUN apt-get install  -yqq libaio1  libnuma1  libmecab2  libsasl2-2    psmisc  psmisc  perl

WORKDIR /var/lib

COPY mysql-server_8.0.22-1ubuntu16.04_amd64.deb-bundle.tar  .

RUN echo mysql-community-server mysql-community-server/root-pass password '' | debconf-set-selections \
&& echo mysql-community-server mysql-community-server/re-root-pass password '' | debconf-set-selections \
&& "echo mysql-community-server mysql-server/default-auth-override select Use Strong Password Encryption (RECOMMENDED)"|debconf-set-selections

RUN tar -xvf mysql-server_8.0.22-1ubuntu16.04_amd64.deb-bundle.tar \
&& dpkg -i mysql-common_8.0.22-1ubuntu16.04_amd64.deb \ 
&& dpkg -i mysql-community-client-plugins_8.0.22-1ubuntu16.04_amd64.deb \
&& dpkg -i mysql-community-client-core_8.0.22-1ubuntu16.04_amd64.deb \ 
&& dpkg -i mysql-community-client_8.0.22-1ubuntu16.04_amd64.deb \ 
&& dpkg -i mysql-client_8.0.22-1ubuntu16.04_amd64.deb \ 
&& dpkg -i mysql-community-server-core_8.0.22-1ubuntu16.04_amd64.deb \ 
&& dpkg -i mysql-community-server_8.0.22-1ubuntu16.04_amd64.deb \ 
&& dpkg -i mysql-server_8.0.22-1ubuntu16.04_amd64.deb \
&& rm mysql-server_8.0.22-1ubuntu16.04_amd64.deb-bundle.tar \
&& rm *.deb
